<script src="./page.js"></script>
<style lang="less" rel="stylesheet/less" scoped>
    @import "./page.less";
</style>

<template>
    <div class="card-wrapper">
        <div class="card-panel">
            <div>
                <el-form class="search-form" :model="param" >
                    <el-row>
                        <el-col :span="5" class="el-item-128">
                            <el-form-item label="企业关键字" :label-width="labelWidth" :size="sizeModel">
                                <el-input v-model="param.key"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="2">
                            <el-button type="primary" @click="search" class="btn-block green-btn" size="mini" plain>查询</el-button>
                        </el-col>
                        <el-col :span="2" :offset="1">
                            <el-button type="primary" @click="searchReset" class="btn-block green-btn" size="mini" plain>清空</el-button>
                        </el-col>
                    </el-row>
                </el-form>
            </div>
        </div>
        <div class="table-wrapper pd31">
            <div>
                <el-table :data="list" :header-cell-style="getRowClass" @selection-change="handleSelectionChange" stripe v-loading="loading">
                    <el-table-column prop="name" label="企业名称" width="300px" :show-overflow-tooltip="true">
                        <template slot-scope="scope">
                            <div>
                                <span style="color: #40A292;">{{scope.row.name}}</span>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="code" label="企业代码" :show-overflow-tooltip="true">
                        <template slot-scope="scope">
                            <div>
                                <span style="color: #40A292;">{{scope.row.code}}</span>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="balance" label="余额" :show-overflow-tooltip="true">
                        <template slot-scope="scope">
                            <div>
                                <span>{{scope.row.balance|filterMoney}}</span>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="availBalance" label="可用余额" :show-overflow-tooltip="true">
                        <template slot-scope="scope">
                            <div>
                                <span>{{scope.row.available_balance|filterMoney}}</span>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="availBalance" label="冻结金额" :show-overflow-tooltip="true">
                        <template slot-scope="scope">
                            <div>
                                <span>{{scope.row.disable_balance|filterMoney}}</span>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="service_rate" label="服务费率" :show-overflow-tooltip="true"></el-table-column>
                    <!-- <el-table-column label="操作">
                        <template slot-scope="scope">
                            <div>
                                <el-button type="text" style="color: #40A292;" @click="getDetails(scope.row)">详情</el-button>
                                <el-button type="text" style="color: #909399;">修改</el-button>
                            </div>
                        </template>
                    </el-table-column> -->
                </el-table>
            </div>
            <el-pagination v-show="total>0" class="mt20 pagination" layout="sizes,total, prev, pager, next, jumper" :total="total" :page-size="param.size" :current-page="param.page" :page-sizes="pageNum" @current-change="pageSearch" @size-change="handleSizeChange" background></el-pagination>
            <el-dialog
                :visible.sync="isShowDialog"
                width="70%"
            >
                <div class="dialog-content">
                    <el-form :model="dialogParam" label-width="100px">
                        <el-row type='flex' align="bottom">
                            <el-col :span="10">
                                <el-form-item label="企业名称" class="item">
                                    <el-input v-model="dialogParam.enterPriseName" class="select-input"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="10" :offset="1">
                                <el-form-item label="企业账号" class="item last-item">
                                    <el-input v-model="dialogParam.enterPriseId" class="select-input"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row type='flex' align="bottom">
                            <el-col :span="10">
                                <el-form-item label="可用余额" class="item">
                                    <el-input v-model="dialogParam.availBalance" class="select-input"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="10" :offset="1">
                                <el-form-item label="银行账号" class="item last-item">
                                    <el-input v-model="dialogParam.bankAccount" class="select-input"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row type='flex' align="bottom">
                            <el-col :span="10">
                                <el-form-item label="冻结金额" class="item last-item">
                                    <el-input v-model="dialogParam.freezeBalance" class="select-input"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row type='flex' align="bottom" class="btn-wrapper">
                            <el-button type="primary" @click="getInvestDetail" class="green-btn submit-btn">充值记录</el-button>
                            <el-button type="primary" @click="toTaskDetail" class="green-btn submit-btn">查看任务详情</el-button>
                        </el-row>
                    </el-form>
                </div>
            </el-dialog>
        </div>
    </div>
</template>